package com.cheng.example.controller;

import com.cheng.example.controller.entity.Student;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

@RestController
public class HelloController {


    @RequestMapping("hello")
    public void hello(HttpServletRequest req,String name) {
        System.out.println();
        Map<String, String[]> map = req.getParameterMap();
        System.out.println(name);

    }

    @RequestMapping("/student")
    public Object student(Student student) {
        System.out.println(student.getAge());
        System.out.println(student.getName());
        return student;
    }
}
